home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group00a.txt
/
000072_icon-group-sender _Wed Apr 19 13:56:14 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2001-01-03
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id NAA01144
for icon-group-addresses; Wed, 19 Apr 2000 13:56:00 -0700 (MST)
Message-Id: <200004192056.NAA01144@baskerville.CS.Arizona.EDU>
From: "F.G. van DORP" <F.G.van.Dorp@digimedia.nl>
X-Newsgroups: comp.lang.icon
Subject: Re: Reversible assignment really reversible ?
X-Newsreader: Forte Agent 1.7/32.534
Date: Wed, 19 Apr 2000 19:19:26 GMT
X-Complaints-To: abuse@chello.nl
X-Trace: nlnews00.chello.com 956171966 212.187.67.243 (Wed, 19 Apr 2000 18:19:26 GMT)
To: icon-group@optima.CS.Arizona.EDU
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
On 17 Apr 2000 16:33:32 -0400, "Frank J. Lhota"
<NOSPAM.Frank.Lhota@lexma.meitech.com> wrote:
>...
>
>If I understand your question correctly, you are wondering why reversible
>assignment fails after resumption. The reason for this is that it would have
>an undesired effect on control backtracking. Consider the scanning
>expression above, where text is "queen":
>
> (i <- 3) assigns 3 to i and suspends;
> (j < find("q")) fails, so we resume the most recently
Surely you mean i <=
>suspended expression;
> (i <- 3) is resumed, so i gets its previous value (1);
>
>Now if (i <- 3) were to succeed after being resumed, goal-driven evaluation
>requires that we evaluate (i < find("q")) again, this time with i=1. This
>evaluation would succeed, and therefor the whole scanning expression would
>succeed, giving j=1. Clearly, this is not what you wanted.
Why not, after all it would still be true !
However, with the present implementation the first rev.assignment that gets
resumed in a compound expression, will make the whole expression fail.
Such a waste...
Besides, I'd imagine you'd avoid using regular assignments in compound
expressions in the first place: should the expression fail in the end, all
succesful regular assignments within this expression would still
be permanent, contrary to rev.assignments (your version or mine).
==================